package com.zhonghan.recharge.service.impl.jisu;

import java.net.URLEncoder;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

import com.alibaba.fastjson.JSONObject;

public class SmsSendUtils {

	private static final Logger logger = LogManager.getLogger(SmsSendUtils.class);
	public static final String APPKEY = "1ebd266b17052bd4";// 你的appkey   
    public static final String URL = "http://api.jisuapi.com/sms/send";
    //public static final String mobile = "18395920855";// 手机号
    //public static final String content = "用户您好。【极速数据】";// utf-8

    public static void send(String mobile,String content) {
        String result = null;
        String url;
 
        try {
        	
        	url = URL + "?mobile=" + mobile + "&content=" + URLEncoder.encode(content, "utf-8") + "&appkey="
			        + APPKEY;
            result = HttpUtil.sendGet(url, "utf-8");
            /*JSONObject json = JSONObject.parseObject(result);
            if (json.getInteger("status") != 0) {
            	logger.info(json.getString("msg"));
            } else {
                JSONObject resultarr = json.parseObject("result");
                String count = resultarr.getString("count");
                String accountid = resultarr.getString("accountid");
                logger.info(count + " " + accountid);
            }*/
            
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
}
